package com.shuoyue.ycgk.ui.questionbank.practice.checkwrongs;

import android.content.Context;
import android.content.Intent;

import com.shuoyue.ycgk.entity.QuestionParent;
import com.shuoyue.ycgk.ui.questionbank.base.BaseQuestionActivity;

import java.util.ArrayList;
import java.util.List;

public class CheckQuestionWrongActivity
        extends BaseQuestionActivity {
    String pagerName;

    @Override
    public Class getClassT() {
        return com.shuoyue.ycgk.ui.questionbank.practice.checkwrongs.DoneWrongMateralFragment.class;
    }

    @Override
    public Class getClassK() {
        return com.shuoyue.ycgk.ui.questionbank.practice.checkwrongs.DoneWrongSimpleFragment.class;
    }

    @Override
    protected void initView() {
        super.initView();
        pagerName = getIntent().getStringExtra("epName");
        name.setText(pagerName);
    }

    public static void start(Context source, String name, ArrayList<QuestionParent> questionParents) {
        source.startActivity(new Intent(source, CheckQuestionWrongActivity.class)
                .putExtra("epName", name)
                .putExtra("questions", questionParents)
        );
    }

    @Override
    public void initData() {
        super.initData();
        questionParents = (List<QuestionParent>) getIntent().getSerializableExtra("questions");
        if (questionParents != null) {
            setCheckData(questionParents);
        }
    }

    @Override
    public void lastOne() {
        finish();
    }

    @Override
    public void back() {
        finish();
    }


}
